package service;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import dao.CourseDao;
import pojo.Course;

@Service("courseService")
@Mapper
public class CourseService {
	@Autowired
	private CourseDao courseDao;
	
	public Course selectCourse(@Param("courseid")int courseid) {
		return courseDao.selectCourse(courseid);
	}
	public List<Course>selectAll(){
		return courseDao.selectAll();
	}
	public List<Course>selectCourseByTeacherid(@Param("teacherid")int teacherid){
		return courseDao.selectCourseByTeacherid(teacherid);
	}
	public int insertCourse(Course course) {
		return courseDao.insertCourse(course);
	}
	public int nextPrimaryKey() {
		return courseDao.nextPrimaryKey();
	}
}
